package self.hoy.demo.cloud.sentinel.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import self.hoy.demo.cloud.sentinel.conf.FeignConfiguration;
import self.hoy.demo.cloud.sentinel.fall.EchoServiceFallback;

/**
 * @author 三共小不
 * @date 2021/7/6
 */
@FeignClient(name = "service-provider", fallback = EchoServiceFallback.class, configuration = FeignConfiguration.class)
public interface EchoService {

    @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)
    String echo(@PathVariable("str") String str);
}

